home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
cdplay
/
cdplaye2.frm
< prev
next >
Wrap
Text File
|
1995-05-07
|
11KB
|
358 lines
VERSION 2.00
Begin Form CDEntry
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Compact Disc Database"
ClientHeight = 6510
ClientLeft = 2940
ClientTop = 2475
ClientWidth = 6135
ClipControls = 0 'False
Height = 6915
Left = 2880
LinkTopic = "Form2"
MaxButton = 0 'False
ScaleHeight = 6510
ScaleWidth = 6135
Top = 2130
Width = 6255
Begin SSPanel Panel3D1
BackColor = &H00C0C0C0&
BevelInner = 1 'Inset
BevelOuter = 1 'Inset
Font3D = 0 'None
Height = 6255
Left = 120
TabIndex = 10
Top = 120
Width = 5895
Begin PictureBox PicLogo
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 615
Left = 1680
ScaleHeight = 615
ScaleWidth = 2535
TabIndex = 11
Top = 120
Width = 2535
Begin Label lblLogo
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "CD Player"
FontBold = -1 'True
FontItalic = -1 'True
FontName = "MS Serif"
FontSize = 24
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00C00000&
Height = 525
Index = 0
Left = 0
TabIndex = 12
Top = 0
Width = 2415
End
Begin Label lblLogo
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "CD Player"
FontBold = -1 'True
FontItalic = -1 'True
FontName = "MS Serif"
FontSize = 24
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00FFFFFF&
Height = 525
Index = 1
Left = 0
TabIndex = 13
Top = 30
Width = 2415
End
End
Begin CommandButton Command1
Cancel = -1 'True
Caption = "&Cancel"
Height = 495
Index = 2
Left = 240
TabIndex = 9
Top = 5520
Width = 5415
End
Begin CommandButton Command1
Caption = "&Reset Tracks"
Height = 495
Index = 1
Left = 240
TabIndex = 8
Top = 4920
Width = 5415
End
Begin TextBox Text3
Alignment = 2 'Center
Height = 375
Left = 240
MultiLine = -1 'True
TabIndex = 3
Top = 1440
Width = 5415
End
Begin CommandButton Command1
Caption = "&Save"
Height = 495
Index = 0
Left = 240
TabIndex = 7
Top = 4320
Width = 5415
End
Begin TextBox Text2
Alignment = 2 'Center
Height = 375
Left = 240
MultiLine = -1 'True
TabIndex = 1
Top = 840
Width = 5415
End
Begin TextBox Text1
Alignment = 2 'Center
Height = 375
Left = 240
MultiLine = -1 'True
TabIndex = 5
TabStop = 0 'False
Top = 2160
Width = 5415
End
Begin ListBox List1
Height = 1395
Left = 240
TabIndex = 6
Top = 2640
Width = 5415
End
Begin Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "&Artist:"
Height = 195
Left = 240
TabIndex = 2
Top = 1200
Width = 510
End
Begin Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "C&D Title:"
Height = 195
Left = 240
TabIndex = 0
Top = 600
Width = 765
End
Begin Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "&Track Title:"
Height = 195
Left = 240
TabIndex = 4
Top = 1920
Width = 5415
End
End
End
Option Explicit
Dim SelIndex As Integer
Dim Text1Dirty As Integer
Dim List1Dirty As Integer
Sub Command1_Click (Index As Integer)
Dim Answer As Integer
Static Dirty As Integer
Select Case Index
Case 0 ' Save
If Text1Dirty = True Then
Answer = MsgBox("Edit In Progress, Abort?", 4, "OOPS!")
If Answer = 6 Then
Answer = MsgBox("Save Changes?", 4, "Save")
If Answer = 6 Then
Call UpdateTracks(List1, True)
CommitChanges
CDInfo.CDTitle = Text2
CDInfo.CDAuthor = Text3
Unload Me
ElseIf Answer = 7 Then
Unload Me
End If
ElseIf Answer = 7 Then
Text1.SetFocus
Exit Sub
End If
Else
Answer = MsgBox("Save Changes?", 4, "Save")
If Answer = 6 Then
Call UpdateTracks(List1, True)
CDInfo.CDTitle = Text2
CDInfo.CDAuthor = Text3
CommitChanges
Unload Me
ElseIf Answer = 7 Then
Unload Me
End If
End If
Case 1 ' Reset Titles
Call UpdateTracks(List1, False)
Call LoadListBox(List1)
Dirty = True
Case 2 ' Cancel
If Dirty = True Then GetCDInfo
Unload Me
End Select
End Sub
Sub Form_Activate ()
Text2.SetFocus
End Sub
Sub Form_Load ()
CenterForm CDEntry, False
CenterLogo Me, Panel3D1
Text2 = CDInfo.CDTitle
Text3 = CDInfo.CDAuthor
Call LoadListBox(List1)
If CDForm.mnuOptionsItem(2).Checked Then OnTop CDForm
End Sub
Sub Form_Unload (Cancel As Integer)
If CDForm.mnuOptionsItem(2).Checked Then OnTop CDForm
End Sub
Sub List1_Click ()
Dim Title As String
Title = Mid$(List1.Text, (InStr(List1.Text, Chr$(9)) + 1), (Len(List1.Text) - (InStr(List1.Text, Chr$(9)))))
Title = (Left$(Title, (InStr(Title, Chr$(9)) - 1)))
Text1 = Title
End Sub
Sub List1_DblClick ()
Dim Title As String
Title = Mid$(List1.Text, (InStr(List1.Text, Chr$(9)) + 1), (Len(List1.Text) - (InStr(List1.Text, C